<template>
  <view>
    <swiper autoplay :interval="3000" circular class="swiper">
      <swiper-item v-for="(i, index) in data.children" :key="index">
        <img :src="i.imageUrl" @click="clickItem()" class="img" />
      </swiper-item>
    </swiper>
  </view>
</template>

<script>
import { getCouponBanner } from "@/api/home/index"
export default {
  props: {
    data: {
      type: String,
      default: '',
    }
  },
  methods: {
    clickItem () {
      uni.navigateTo({ url: '/subpackage/personalCenter/coupon' })
    }
  }
}
</script>

<style lang="scss" scoped>
.swiper {
  height: 118rpx;

  .img {
    width: 100%;
    height: 100%;
  }
}
</style>